<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SupermarketDemo</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link
	href="${pageContext.request.contextPath}/static/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/static/css/bootstrap-responsive.min.css"
	rel="stylesheet">
<link
	href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/static/css/font-awesome.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/css/style.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/static/css/pages/dashboard.css"
	rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<style>
.col-center-block {
	float: none;
	display: block;
	margin-left: auto;
	margin-right: auto;
}
</style>
</head>
<body>
	<!-- 头部开始 -->
	<%@include file="/common/head.jsp"%>
	<!-- 头部结束 -->

	<div class="subnavbar">
		<div class="subnavbar-inner">
			<div class="container">
				<ul class="mainnav">

					<li><a href="${pageContext.request.contextPath}/deptG"><i
							class="icon-group"></i><span>部门管理</span> </a></li>
					<li><a href="${pageContext.request.contextPath}/Vendor"><i
							class="icon-truck"></i><span>供应商管理</span> </a></li>

					<li><a
						href="${pageContext.request.contextPath}/toBill?method=3"><i
							class="icon-copy"></i><span>票据管理</span> </a></li>

					<li class="active"><a
						href="${pageContext.request.contextPath}/querybill.do?method=0"><i
							class=" icon-paste"></i><span>缴费管理</span> </a></li>

					<li></li>
				</ul>
			</div>
			<!-- /container -->
		</div>
		<!-- /subnavbar-inner -->
	</div>
	<!-- /subnavbar -->
	<div class="page-content-area">
		<div class="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->

				<table id="sample-table-1"
					class="table table-striped table-bordered table-hover text-center">
					<thead>
						<tr>
							<th class="center"><label class="position-relation">

							</label></th>
							<th>id</th>
							<th>供应商</th>
							<th>日期</th>
							<th>最后日期</th>
							<th>支付金额</th>
							<th>支付状态</th>
							<th>支付方式</th>
							<th>支付结果</th>
							<th></th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${billname}" var="billn">
							<tr>
								<td class="center"><label class="position-relation">
								</label></td>
								<td><p class="id">${billn.id}</p></td>
								<td>${billn.vendorName}</td>
								<td>${billn.date}</td>
								<td>${billn.dueDate}</td>
								<td>${billn.billSum}</td>
								<td>${billn.billPay}</td>
								<td>
								现金支付：
								<input type="checkbox" id="myBtn"
									class="checkbox" /> &nbsp;&nbsp;&nbsp;
									
								</td>
								<td>
								<!-- Modal -->
								<div class="modal fade" id="myModal${billn.id}" tabindex="-1" role="dialog"
									aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-dialog">
											<form action="${pageContext.request.contextPath}/querybill.do?method=3&id=${billn.id}&vendorName=${billn.vendorName}" method="post">
										<div class="modal-content">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal"
													aria-hidden="true">&times;</button>
												<h4 class="modal-title" id="myModalLabel">${billn.id}
												</h4>
											</div>
											<div class="modal-body">
											<input type="text" name="paidFlag" id="paidFlag"/>
												提交并支付(无须在点击支付)
											<br>
											<span style="color:red" id="txtPaidErr"></span>
											
											</div>
											<div class="modal-footer">
												<button type="button" class="btn btn-default"
													data-dismiss="modal">关闭</button>
													 
												<input type="submit" id="paid" class="btn btn-primary" value="支付"/>
											</div>
										</div>
												</form>
										<!-- /.modal-content -->
									</div>
									<!-- /.modal -->
								</div>
								<p class="flag" >${billn.paidFlag}</p>
								</td>


								<td>
									<a 
									href="${pageContext.request.contextPath}/querybill.do?method=3&id=${billn.id}&vendorName=${billn.vendorName}"
									> <input type="button" class="btn btn-info btn-xs xianj" value="现金支付"/></a>
									 <input type="button"
									data-toggle="modal" data-target="#myModal${billn.id}" value="支票支付"
									placeholder="支票号" class="btn btn-info btn-xs zhip"
									 /></td>
							</tr>

						</c:forEach>
					</tbody>
				</table>
			</div>

			<!-- /.col -->
		</div>
	</div>
	<!-- /main-inner -->
	<!-- /main -->
	<p></p>

	<!-- /footer -->
	<!-- Le javascript
================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script
		src="${pageContext.request.contextPath}/static/js/jquery-1.7.2.min.js"></script>
	<script
		src="${pageContext.request.contextPath}/js/billinfo.js"></script>
	<script
		src="${pageContext.request.contextPath}/static/js/excanvas.min.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/chart.min.js"
		type="text/javascript"></script>
	<script src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
	<script src="${pageContext.request.contextPath}/js/checkbox.js"></script>
	<script language="javascript" type="text/javascript"
		src="${pageContext.request.contextPath}/static/js/full-calendar/fullcalendar.min.js"></script>

	<script src="${pageContext.request.contextPath}/static/js/base.js"></script>

</body>
</html>